<template>
	<view class="list">
		<view class="itembox" v-for="(item,index) in list" :key="index" @click="toGoodsdetails(item)">
			<image class="ite-image" :src="path+item.logo"></image>
			<view class="cont">
				<view class="title">{{item.name}}</view>
				<view class="title2">￥<text>{{(item.price/100 || 0).toFixed(2) }}</text></view>
				<view class="title3">
					<text v-for="(ite,j) in item.tagList":key='j'>{{ite}}</text>
					 
				</view>
			</view>
		</view>
		<view class="itembox2" v-if="list.length==0">
			即将上线，敬请期待！
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: [null, null, null, null]
			}
		},
		data() {
			return {
				path: this.$http.tpUrl+'/' , // 图片前缀
			};
		},
		created(){
			 
		},
		methods: {
			 
			//详情
			toGoodsdetails(item) {
				let paramsStr=`?ProductEntityId=${item.productEntityId}`
				console.log(paramsStr)
				uni.navigateTo({
					url: `/pages_category_page1/goods/goodsDetails${paramsStr}`
				})
			},
		}
	}
</script>

<style scoped>
	.itembox2{
		width: 100%;
		text-align: center;
		    font-weight: 900;
			margin-top: 10rpx;
	}
	.list {
		padding-top: 10rpx;
	}
	.itembox {
		width: 328rpx;
		/* height: 446rpx; */
		height: 472rpx;
		background: #fffbf3;
		border-radius: 20rpx;
		box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(93,69,41,0.25); 
		display: inline-block;
		overflow: hidden;
		margin-top: 30rpx;
	}
	.list .itembox:nth-child(2n+1){
		margin-right: 29rpx;
	}
	.itembox .ite-image {
		width: 330rpx;
		height: 330rpx;
		background: #999;
	}
	.cont {
		padding: 16rpx 20rpx;
		padding-bottom: 24rpx;
	}
	.title {
		font-size: 32rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		text-align: left;
		color: #5d4529;
		overflow: hidden; 
		text-overflow: ellipsis; 
		white-space: nowrap; 
	}
	.title2 {
		font-size: 24rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		text-align: left;
		color: #5d4529;
		margin-top: 10rpx;
	}
	.title2 text{
		font-size: 40rpx;
	}
	.title3 {
		font-size: 24rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #fdab34;
		margin-top: 10rpx;
	}
	.title3 text {
		display: inline-block;
		background: #fff0db;
		border-radius: 10rpx;
		padding: 8rpx 18rpx;
		margin-right: 10rpx;
		text-align: center;
	}
	
</style>